<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>从指定的服务器上请求多个元素</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="memcached.getdelayed.html">Memcached::getDelayed</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="memcached.getmulti.html">Memcached::getMulti</a></div>
 <div class="up"><a href="class.memcached.html">Memcached</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="memcached.getdelayedbykey" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Memcached::getDelayedByKey</h1>
  <p class="verinfo">(PECL memcached &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">Memcached::getDelayedByKey</span> &mdash; <span class="dc-title">从指定的服务器上请求多个元素</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-memcached.getdelayedbykey-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>Memcached::getDelayedByKey</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>
   , <span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$with_cas</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.callback" class="type callback">callback</a></span> <code class="parameter">$value_cb</code></span>
  ]] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>Memcached::getDelayedByKey()</strong></span>除了可以通过<em><code class="parameter">server_key</code></em>参数自由的指定<em><code class="parameter">key</code></em>
   所映射的服务器外， 在功能上等同于<span class="methodname"><a href="memcached.getdelayed.html" class="methodname">Memcached::getDelayed()</a></span>。(译注: 关于*ByKey系列方法及$server_key的工作原理请参照addByKey方法文档)
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-memcached.getdelayedbykey-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">server_key</code></em></dt>

     <dd>

      <p class="para">
       本键名用于识别储存和读取值的服务器。没有将实际的键名散列到具体的项目，而是在决定与哪一个 memcached 服务器通信时将其散列为服务器键名。这使得关联的项目在单一的服务上被组合起来以提高多重操作的效率。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">keys</code></em></dt>

     <dd>

      <p class="para">
       要请求的key的数组。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">with_cas</code></em></dt>

     <dd>

      <p class="para">
       是否同时请求CAS标记。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">value_cb</code></em></dt>

     <dd>

      <p class="para">
       结果回掉函数或<strong><code>NULL</code></strong>。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-memcached.getdelayedbykey-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
   如需要则使用 <span class="methodname"><a href="memcached.getresultcode.html" class="methodname">Memcached::getResultCode()</a></span>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-memcached.getdelayedbykey-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="memcached.getdelayed.html" class="methodname" rel="rdfs-seeAlso">Memcached::getDelayed()</a> - 请求多个元素</span></li>
    <li class="member"><span class="methodname"><a href="memcached.fetch.html" class="methodname" rel="rdfs-seeAlso">Memcached::fetch()</a> - 抓取下一个结果</span></li>
    <li class="member"><span class="methodname"><a href="memcached.fetchall.html" class="methodname" rel="rdfs-seeAlso">Memcached::fetchAll()</a> - 抓取所有剩余的结果</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="memcached.getdelayed.html">Memcached::getDelayed</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="memcached.getmulti.html">Memcached::getMulti</a></div>
 <div class="up"><a href="class.memcached.html">Memcached</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
